package cn.exrick.xboot.supervisionDepartment.controllerImpl

import cn.exrick.xboot.base.entity.Duty
import cn.exrick.xboot.base.service.IDutyService
import cn.exrick.xboot.base.vo.AdministrativeOfficeVo
import cn.exrick.xboot.base.vo.DutyVo
import cn.exrick.xboot.core.common.vo.PageVo
import cn.exrick.xboot.core.common.vo.Result
import cn.exrick.xboot.supervisionDepartment.controller.ISupervisionDepartmentController
import org.springframework.web.bind.annotation.RestController
import javax.annotation.Resource

@RestController
open class DutyController: ISupervisionDepartmentController.IDuty {

    @Resource
    private lateinit var iDutyService: IDutyService

    override fun createOrUpdateDuty(duty: Duty): Result<Any?>? {

        return iDutyService.createOrUpdateDuty(duty)
    }

    override fun removeDuty(ids: Array<out String>): Result<Any?>? {

        return iDutyService.removeDuty(ids)
    }

    override fun getByPage(pageVo: PageVo, duty: Duty): Result<MutableMap<String, Any?>>? {

        return iDutyService.getByPage(pageVo, duty)
    }

    override fun getDutyNameById(id: String?): String? {

        return iDutyService.getDutyNameById(id)
    }

    override fun dutyVoList(): Result<MutableList<DutyVo>?>? {

        return iDutyService.dutyVoList()
    }


}